home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / dtype / dtpref.lha / DTpref / Install < prev    next >
Text File  |  1996-05-18  |  5KB  |  183 lines

  1. ;******************************************************************************
  2. ; DTprefV3.x Insallscript
  3. ; Written by Swen K. Stullich/UFT   11.04.96
  4. ;******************************************************************************
  5.  
  6. ; Initialize a few things
  7. (set docbits 0)
  8. (set usedt 0)            ; internal datatypes
  9. (set usedtext 0)        ; external datatypes
  10.  
  11.  
  12. ;******************************************************************************
  13. ; Willkommen ;-)
  14. (welcome "DTprefV3-Installer")
  15. (message
  16.     "Welcome to the DTprefV3-Install-Script\n"
  17.     "This script will install and set the\n"
  18.     "preferences (Tooltypes) of DTpref\n\n"
  19.     "DTpref is ©1995-96\n"
  20.     "Swen K. Stullich\n"
  21.     "United Forces Tools"
  22. )
  23.  
  24. ;******************************************************************************
  25. ; Prompt for the used internal datatypes
  26. ; and set then the tooltype
  27.  
  28. ; Bitmaske herstellen
  29. (set usedt (+ usedt (shiftleft (exists "LIBS:Datatypes/binary.datatype")  0)))
  30. (set usedt (+ usedt (shiftleft (exists "LIBS:Datatypes/exe.datatype")     1)))
  31. (set usedt (+ usedt (shiftleft (exists "LIBS:Datatypes/font.datatype")    2)))
  32. (set usedt (+ usedt (shiftleft (exists "LIBS:Datatypes/hwgpost.datatype") 3)))
  33. (set usedt (+ usedt (shiftleft (exists "LIBS:Datatypes/jfif.datatype")    4)))
  34. (set usedt (+ usedt (shiftleft (exists "LIBS:Datatypes/photocd.datatype") 5)))
  35.  
  36. ; Bitmaske abfragen
  37. (set usedt
  38.     (askoptions
  39.         (prompt "Which internal datatypes should I install")
  40.         (help "The marked datatypes will be shown in DTpref. The other datatypes will be skipped.")
  41.         (choices "binary.datatype" "exe.datatype" "font.datatype" "hwgpost.datatype" "jfif.datatype" "photocd.datatype")
  42.         (default usedt)
  43.     )
  44. )
  45.  
  46. ;Icon-Tooltype setzen
  47. (set tooltext "")
  48. (if (NOT (BITAND usedt (shiftleft 1 0))) (set tooltext (cat tooltext "binary|")))
  49. (if (NOT (BITAND usedt (shiftleft 1 1))) (set tooltext (cat tooltext "exe|")))
  50. (if (NOT (BITAND usedt (shiftleft 1 2))) (set tooltext (cat tooltext "font|")))
  51. (if (NOT (BITAND usedt (shiftleft 1 3))) (set tooltext (cat tooltext "hwgpost|")))
  52. (if (NOT (BITAND usedt (shiftleft 1 4))) (set tooltext (cat tooltext "jfif|")))
  53. (if (NOT (BITAND usedt (shiftleft 1 5))) (set tooltext (cat tooltext "photocd|")))
  54. (if (tooltext) (set tooltext (substr tooltext 0 (- (strlen tooltext) 1))))
  55. (if (tooltext)
  56.     (tooltype
  57.         (dest "DTpref/DTpref")
  58.         (settooltype "DisableDT" tooltext)
  59.     )
  60. )
  61.  
  62. ;******************************************************************************
  63. ; Prompt for the used external datatypes
  64. ; and set then the tooltype
  65.  
  66. ; Bitmaske herstellen
  67. (set usedtext (+ usedtext (shiftleft (if (exists "LIBS:Datatypes/icon.datatype") (if (>= (getversion "LIBS:Datatypes/icon.datatype") (+ (* 39 65536) 4)) 1 0) 0) 0)))
  68. (set usedtext (+ usedtext (shiftleft (if (exists "LIBS:Datatypes/tiff.datatype") (if (>= (getversion "LIBS:Datatypes/tiff.datatype") (+ (* 43 65536) 0)) 1 0) 0) 1)))
  69.  
  70. ; Bitmaske abfragen
  71. (set usedtext
  72.     (askoptions
  73.         (prompt "Which external datatypes should I install")
  74.         (help "The marked datatypes will be shown in DTpref. The other datatypes will be skipped.")
  75.         (choices "icon.datatype" "tiff.datatype")
  76.         (default usedtext)
  77.     )
  78. )
  79. ;******************************************************************************
  80. ; Prompt for components and their directories
  81.  
  82. ; Prefs
  83. (set prefsdir
  84.     (askdir
  85.         (prompt "Where do the Preferences belong")
  86.         (help @askdir-help)
  87.         (default "SYS:Prefs")
  88.     )
  89. )
  90.  
  91. ; Objects
  92. (if usedtext
  93.     (set objdir
  94.         (askdir
  95.             (prompt "Where do the Objects belong")
  96.             (help @askdir-help)
  97.             (newpath)
  98.             (default (tackon prefsdir "DTObjects"))
  99.         )
  100.     )
  101. )
  102.  
  103. (if usedtext
  104.     ;ggf. ObjDir erzeugen
  105.     (if (not (exists objdir)) (makedir objdir))
  106. )
  107.     ;Icon-Tooltype setzen fuer exernalDTs
  108.     (set AddTT "")
  109. (if usedtext (if (BITAND usedtext (shiftleft 1 0)) (set AddTT (cat AddTT (cat " DT=icon.datatype," (tackon objdir "DTpref_info.info"))))))
  110. (if usedtext (if (BITAND usedtext (shiftleft 1 1)) (set AddTT (cat AddTT (cat " DT=tiff.datatype," (tackon objdir "DTpref.tiff"))))))
  111.  
  112. ; Docs
  113. (set docsdir
  114.     (askdir
  115.         (prompt "Where do the Documentations belong")
  116.         (help @askdir-help)
  117.         (default "SYS:Docs")
  118.     )
  119. )
  120.  
  121. ;******************************************************************************
  122. ;******************************************************************************
  123. ;******************************************************************************
  124.  
  125. ;**********************************************************************
  126. ; Install
  127. ;**********************************************************************
  128. (
  129.     ; Show what we are doing
  130.     (working "Installing " @app-name)
  131.  
  132.     ; Install the library
  133.     (copylib
  134.         (prompt "Copying gtlayout.library")
  135.         (help @copylib-help)
  136.         (source "libs/gtlayout.library")
  137.         (dest "LIBS:")
  138.         (confirm)
  139.     )
  140.  
  141.     ; Install the Editor
  142.     (copyfiles
  143.         (prompt "Copying the Preferenceseditor")
  144.         (help @copyfiles-help)
  145.         (source "DTpref/")
  146.         (dest prefsdir)
  147.         (pattern "#?")
  148.         (infos)
  149.     )
  150.     ; Set the "DT=" attributes in the Editor
  151.     (set addttcmd "")
  152.     (if usedtext
  153.         (set addttcmd (cat "AddTT  " (cat (tackon prefsdir "DTpref") AddTT)))
  154.         (run addttcmd)
  155.     )
  156.  
  157.     ; Install the DTObjects
  158.     (if objdir
  159.         (copyfiles
  160.             (prompt "Copying the Datatypeobjects")
  161.             (help @copyfiles-help)
  162.             (source "DTObjects/")
  163.             (dest objdir)
  164.             (pattern "#?")
  165.             (infos)
  166.             (confirm)
  167.         )
  168.     )
  169.  
  170.     ; Install the Docs
  171.     (copyfiles
  172.         (prompt "Copying the Documentations")
  173.         (help @copyfiles-help)
  174.         (source "Docs/")
  175.         (dest docsdir)
  176.         (pattern "#?")
  177.         (infos)
  178.         (confirm)
  179.     )
  180. )
  181.  
  182. (set @default-dest prefsdir)
  183.